<template>
  <div class="code-row-bg">
    <Row type="flex" style="margin:20px 0">
      <Col span="6" v-for="item in orgList" :key="item.id">
        <div class="org-list" @click="orgDetail(item.id)">
          <img :src="item.orgLogo" alt="">
          <p>{{item.name}}</p>
        </div>
      </Col>
    </Row>

  </div>
</template>

<script>
  export default {
    data() {
      return {
        orgList: []
      }
    },
    mounted() {
      this.orgPage()
    },
    methods: {
      orgPage() {
        this.$get('/api/api/app/org/list').then((res) => {
          if (res.code === 0) {
            this.orgList = res.data
          }
        })
      },
      orgDetail(id) {
        this.$router.push({path: '/index/org-detail', query: {id: id}})
      }
    }
  }
</script>

<style scoped>
  .code-row-bg{
    width: 1200px;
    margin: 0 auto;
  }
  .org-list{
    height: 208px;
    background: #fff;
    margin: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .org-list img{
    width: 100%;
    height: 178px;
  }
  .org-list p{
    height: 30px;
    line-height: 30px;
  }
</style>
